<template>
	<view v-if="payVip && payVip.id" class="ydl p-15-20 f-bt f14">
		<view class="f-g-1 f-bt">
			<view class="f-g-1 flex f-y-c t-o-e">
				<u-avatar :src="payVip.avatar" size="38"></u-avatar>
				<view class="ml10">
					<view class="f16 wei">{{payVip.nickname}}-{{payVip.id}}</view>
					<view class="f12 mt5">{{payVip.mobile}}</view>
				</view>
			</view>
			<view class="f-g-0 mr10 f-xy-e yer pr10">
				<view class="f-xy-e">
					<view class="c9 f12">余额</view>
					<view class="c0 mt5 wei">￥{{payVip.account.balance}}</view>
				</view>
			</view>
		</view>
		<view class="f-g-0 f-y-c">
			<view class="tcbtn f12 f-c" @click="handVip">退出</view>
		</view>
	</view>
	<view class="f-bt xzhy p10" v-else>
		<view class="flex f-g-1">
			<view class="f14"><text class="mr5 iconfont c6 f14 icon-huiyuandengji-copy"></text>
			</view>
			<view class="f14 c0 f-1" @click="handvipUser">点击登录会员</view>
		</view>
		<view class="f-g-0 f-y-c" @click="handvipUser">
			<u-icon name="arrow-right" size="12"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		components: {
			
		},
		props: {
			payVip: {
				type: Object,
				default: () => {}
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			handvipUser(){
				this.$emit('handvipUser')
			},
			handVip(){
				this.$emit('vip')
			},
		}
	}
</script>

<style lang="scss" scoped>
	.xzhy {
		background: #FFFBE8;
	}
	
	.ydl {
		background: linear-gradient(to bottom, #FEEFCE, #FEF8E8);
	
		.yer {
			border-right: 1px solid #ddd;
		}
	
		.tcbtn {
			width: 60px;
			height: 48rpx;
			background: #FD8906;
			color: #fff;
			border-radius: 30rpx;
		}
	}
	
	.f-xy-e {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		text-aling: right;
	}
</style>